#include<string>
#include<cstring>
#include<sys/types.h>
#include<sys/wait.h>
#include<sys/stat.h>
#include<cerrno>
#include<iostream>
#include<cassert>
#include<fcntl.h>
#include<cstdio>
using namespace std;



#define NAMED_PIPE "/home/zq/linux_code/tmp/my_pipe_zq"

bool createFifo(const string& path){
    umask(0);
    int n = mkfifo(path.c_str(),0666);
    if(n == 0){
        return true;
    }else{
        cout<<"errno:"<<errno<<"err string: "<<strerror(errno)<<endl;
        return false;
    }

}

void  removeFifo(const string& path){
    int n = unlink(path.c_str());
    assert(n == 0);
    (void)n;
}